package com.satan.core;
import com.satan.core.cfg.AppCfg;
import org.springframework.batch.core.configuration.support.ClasspathXmlApplicationContextsFactoryBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by tain198127@163.com on 15/11/7.
 */
@RestController
@EnableAutoConfiguration
@SpringBootApplication
@ComponentScan
public class Init {


    @RequestMapping("/")
    String home()
    {
        String rst = "hello";
        return rst;
    }

    public Init()
    {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath*:applicationContext.xml");

    }
    public static void main(String arg[])throws Exception
    {
        SpringApplication.run(Init.class,arg);
    }
}
